<%-- 
    Document   : ShowConfirmation
    Created on : Sep 13, 2013, 11:20:05 PM
    Author     : frank
--%>

<%@ page import="cart.*, java.text.*" %>
<html>
<body>
<h1>Your Order is confirmed!</h1> 
<% 
    DecimalFormat twoDigits = new DecimalFormat("0.00");
    String totalPrice = "";
            
            try {
                totalPrice = twoDigits.format(((ShoppingCart) session.getAttribute("ShoppingCart")).getTotalPrice());
               
            } catch (Exception e) {
                System.out.println("null session, already checked out");
            }
    %>
    
<h1>The total amount is $<%=totalPrice %></h1>
<% session.invalidate(); %>
</body>
</html> 

